<template>
	<view class="daili">
		<navbar title="合作代理"></navbar>
		
		<view class="bgwhite p30 fs26 mt10">
			<view class="text">
				<view class="word-wrap fc333">
					<text>管理端网页地址：</text>
					<text>{{ info.wapUrl }}</text>
					<text class="copy" @click="copyclick(info.wapUrl)">复制</text>
				</view>
				<view class="word-wrap fc333">
					<text>账号：</text>
					<text>{{ info.account }}</text>
					<text class="copy" @click="copyclick(info.account)">复制</text>
				</view>
				<view class="word-wrap fc333">
					<text>密码：</text>
					<text>{{ info.pwd }}</text>
					<text class="copy" @click="copyclick(info.pwd)">复制</text>
				</view>
			</view>
		</view>
		
		
	</view>
</template>

<script>
	import{
		agentInfo
	} from '@/api/other.js'
	import navbar from '../../components/navbar.vue'
	export default {
		components:{
			navbar
		},
		data() {
			return {
				info:[],
				
			};
		},
		onShow(){
			this.getdata();
		},
		methods:{
			getdata(){
				agentInfo().then(res=>{
					this.info = res.data;
				})
			},
			copyclick(data){
				uni.setClipboardData({
					data: data,
					success: function () {
						console.log('success');
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	.daili{
		
		.text{
			line-height: 50rpx;
		}
		.copy{
			text-decoration: underline;
			color: #6252DF;
			margin-left: 10rpx;
		}
		
	}
</style>
